Feat: Temporal tile custom size with overlap#1510
Open
stduhpf wants to merge 1 commit into
Open
Conversation
leejet
reviewed
May 18, 2026
| int tile_frames = 1; | ||
| int tile_pad = 0; | ||
| // use env variables for now | ||
| const char* env_tile_frames = std::getenv("VAE_TILE_FRAMES"); |
Owner
There was a problem hiding this comment.
Maybe we can add something like --extra-sample-args, but for tiling, such as --extra-tiling-args, to avoid bloating the tiling parameters.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR improves the temporal tiled decoding for the LTX2.3 Video VAE by adding support for custom tile sizes (processing multiple latent frames per batch) and temporal overlap/padding to ensure smoother transitions between "tiles" as the VAE decoder has access to the near future.
For now it ses env variables
VAE_TILE_FRAMESandVAE_TILE_PADto control the effect. In my experience, settingVAE_TILE_FRAMES=4andVAE_TILE_PAD=1seems to give very decent results (see comment).Related Issue / Discussion
#1490
Additional Information
How it works:
Currently, when temporal tiling is enabled, it switches from decoding all latent frames at once to decoding them sequentially one-by-one. However, this causes choppy transitions every 8 frames (corresponding to 1 latent frame).
To fix this, instead of processing one frame at a time, latent frames are now decoded in small, overlapping batches (tiles). Each batch has access to the cached context of all the previous ones (like it is already the case when decoding frames sequentially). To ensure seamless transitions, the final frame(s) of a batch act as an overlap; they are discarded from the current output and re-processed at the start of the next batch.
Quick comparison
output.-.full.webm
output.-.tiling.webm
output.-.t4p1.webm
Checklist